﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using ProgNetComponentsDx.Language;
using ProgNetComponentsDx.Options;
using ProgNetComponents.Logs;

namespace SqlCeManager
{
    static class Program
    {
        private static string[] Args;

        public static bool IsExit
        {
            get;
            set;
        }
        public static bool IsDebug
        {
            get { return IsArgPresent("-debug"); }
        }
        public static bool IsArgPresent(string arg)
        {
            return Args != null && Args.Contains(arg);
        }
       
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main(string[] args)
        {
            LogType lt = LogType.Error;
            if (IsDebug)
                lt = LogType.All;

            Logger.InitDefaultLogger("error.log", lt, lt, IsDebug);

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Properties.Resources.wizard.SetAsDefaultFormIcon();

            SqlCeManager.Init.InitForm f = new Init.InitForm();
            f.ShowDialog();
            
            Application.Run(new FormMain());
        }
    }
}
